<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>vue样式</title>
  </head>
  <body>
    <div id="app">
      <h1 :style="styleObj1">vue 样式写法</h1>
      <h1 :style="[styleObj1,styleObj2]">vue 样式写法</h1>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
      var vm = new Vue({
        el: "#app",
        data: {
            styleObj1:{color:'red', 'font-weight':200},
            styleObj2:{'font-size':'100px'}
        }
      });
    </script>
  </body>
</html>
